Skip to main content

ETCD

What is etcd?

etcd (pronounced et-see-dee) is an open source distributed key-value store for storing and managing the vital data that distributed systems require to function. It is most well-known for managing the configuration, state, and metadata for Kubernetes, a prominent container orchestration technology.

Containerized workloads, like other distributed workloads, have complex management needs that get more complicated as the burden grows. Kubernetes makes managing complex workloads easier by coordinating activities like setup, deployment, service discovery, load balancing, job scheduling, and health monitoring across all clusters, which may operate on many computers in different locations.

However, in order to achieve this coordination, Kubernetes requires a data store that offers a single, consistent source of truth about the status of the system—all of its clusters and pods, as well as the application instances that reside within them—at any given moment. The data store that was utilised to build and maintain this version of the truth is called etcd.

etcd is a suitable choice for managing crucial system and metadata across clusters of any distributed application and plays a similar function for Cloud Foundry—the open source, multicloud Platform-as-a-Service (PaaS). The term "etcd" derives from the Linux directory structure's naming convention: All system configuration files for a single system are stored in the “/etc” subdirectory under UNIX. The letter "d" stands for "distributed."

Why etcd?

Serving as the data backbone that keeps a dispersed workload operating is no easy feat. But etcd is made for the job, with the following features built in from the start:

  • Every node in an etcd cluster has access to the whole data store, which is fully replicated.
  • etcd is meant to be highly available, with no single point of failure and the ability to gracefully suffer hardware failures and network partitions.
  • Consistently reliable : Every data ‘read' across all clusters delivers the most recent data 'write'.
  • Fast : etcd has been tested at a rate of 10,000 writes per second.
  • Secure : etcd supports automated Transport Layer Security (TLS) and SSL client certificate authentication. Administrators should establish role-based access restrictions within the deployment and ensure that team members dealing with etcd are limited to the least-privileged degree of access necessary to execute their duties since etcd contains critical and highly sensitive configuration data.
  • Basic : Any programme may read or write data to etcd using normal HTTP/JSON technologies, from simple web applications to extremely sophisticated container orchestration engines like Kubernetes.

etcd and Kubernetes

etcd is one of the fundamental Kubernetes components, and it acts as the primary key-value store for building a fault-tolerant Kubernetes cluster. The status data for each cluster is stored in etcd by the Kubernetes API server. Kubernetes monitors this data and utilises etcd's "watch" function to adjust itself when changes occur. When the values reflecting the cluster's real and ideal states diverge, the "watch" function might trigger a reaction.

CoreOS and the history and maintenance of etcd

etcd was developed by the same team that produced CoreOS Container Linux, a widely used container operating system that can be effectively operated and maintained on a large scale. They created etcd on Raft to coordinate several copies of Container Linux at the same time in order to assure application uptime.

The developers gave etcd to the Cloud Native Computing Foundation (CNCF) in December 2018, a nonprofit organisation that keeps etcd's source code, domains, hosted services, cloud infrastructure, and other project property open source for the container-based cloud development community. Red Hat and CoreOS have combined.